VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form frmPUR800 
   BackColor       =   &H00800000&
   Caption         =   "frmPUR800"
   ClientHeight    =   7170
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   11040
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   ScaleHeight     =   7170
   ScaleWidth      =   11040
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtPON 
      Height          =   315
      Left            =   4875
      TabIndex        =   27
      Top             =   1110
      Width           =   1350
   End
   Begin VB.ComboBox cboOHPOT 
      Height          =   315
      ItemData        =   "frmPUR800.frx":0000
      Left            =   4890
      List            =   "frmPUR800.frx":000D
      TabIndex        =   15
      Top             =   1470
      Width           =   1365
   End
   Begin VB.ComboBox cboOHPOS 
      ForeColor       =   &H000000FF&
      Height          =   315
      ItemData        =   "frmPUR800.frx":003D
      Left            =   8955
      List            =   "frmPUR800.frx":0053
      TabIndex        =   14
      Top             =   2775
      Width           =   1635
   End
   Begin VB.TextBox txtVMNME 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   2790
      TabIndex        =   13
      Top             =   2820
      Width           =   2235
   End
   Begin VB.ComboBox cboOHCPO 
      Height          =   315
      ItemData        =   "frmPUR800.frx":00A2
      Left            =   8970
      List            =   "frmPUR800.frx":00AF
      TabIndex        =   12
      Top             =   2340
      Width           =   1635
   End
   Begin VB.TextBox txtCMNME 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   2790
      TabIndex        =   11
      Top             =   2370
      Width           =   2235
   End
   Begin VB.TextBox txtEXR 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   8955
      TabIndex        =   10
      Top             =   3180
      Width           =   1170
   End
   Begin VB.TextBox txtOHRQD 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   8955
      TabIndex        =   9
      Top             =   1950
      Width           =   1170
   End
   Begin VB.TextBox txtOHVDN 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   1965
      TabIndex        =   8
      Top             =   2805
      Width           =   780
   End
   Begin VB.TextBox txtOHCNO 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   1965
      TabIndex        =   7
      Top             =   2370
      Width           =   750
   End
   Begin VB.TextBox txtOHPOD 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   5730
      TabIndex        =   6
      Top             =   1935
      Width           =   1170
   End
   Begin VB.TextBox txtOHPON 
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   288
      Left            =   1950
      TabIndex        =   5
      Top             =   1965
      Width           =   1500
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "&Exit"
      Height          =   360
      Left            =   1380
      TabIndex        =   3
      Top             =   6750
      Width           =   1170
   End
   Begin VB.CommandButton cmdClose 
      Caption         =   "&Close"
      Height          =   360
      Left            =   150
      TabIndex        =   2
      Top             =   6720
      Width           =   1125
   End
   Begin MSDataGridLib.DataGrid grdPOL 
      Bindings        =   "frmPUR800.frx":00DF
      Height          =   2835
      Left            =   120
      TabIndex        =   4
      Top             =   3795
      Width           =   10695
      _ExtentX        =   18865
      _ExtentY        =   5001
      _Version        =   393216
      BackColor       =   -2147483624
      ForeColor       =   8388608
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   11
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   "OLPOL"
         Caption         =   "line"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column02 
         DataField       =   "OLITN"
         Caption         =   "Item"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column03 
         DataField       =   "OLITD"
         Caption         =   "Item Description"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04 
         DataField       =   "OLODQ"
         Caption         =   "Quantity"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column05 
         DataField       =   "OLODN"
         Caption         =   "Weight"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column06 
         DataField       =   "OLUMP"
         Caption         =   "Unit price"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column07 
         DataField       =   "OLPER"
         Caption         =   "Price per"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column08 
         DataField       =   "OLLAM"
         Caption         =   "Line amount"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column09 
         DataField       =   "OLBLA"
         Caption         =   "B line amount"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column10 
         DataField       =   "OLSTT"
         Caption         =   "Status"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   14.74
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   329.953
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1184.882
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   2670.236
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   1065.26
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   1035.213
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   1094.74
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   1349.858
         EndProperty
         BeginProperty Column08 
            ColumnWidth     =   959.811
         EndProperty
         BeginProperty Column09 
            ColumnWidth     =   840.189
         EndProperty
         BeginProperty Column10 
            ColumnWidth     =   1110.047
         EndProperty
      EndProperty
   End
   Begin MSDataListLib.DataCombo cboOHCUR 
      Bindings        =   "frmPUR800.frx":00F4
      Height          =   315
      Left            =   1935
      TabIndex        =   16
      Top             =   3195
      Width           =   855
      _ExtentX        =   1508
      _ExtentY        =   556
      _Version        =   393216
      Text            =   ""
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "PO number "
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   2
      Left            =   3660
      TabIndex        =   28
      Top             =   1140
      Width           =   1050
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "P.O. status"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   255
      Index           =   13
      Left            =   7860
      TabIndex        =   26
      Top             =   2805
      Width           =   1035
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Customer Type"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   11
      Left            =   7560
      TabIndex        =   25
      Top             =   2385
      Width           =   1335
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Exchange Rate"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   10
      Left            =   7575
      TabIndex        =   24
      Top             =   3210
      Width           =   1320
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Date Requested"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   9
      Left            =   7440
      TabIndex        =   23
      Top             =   1965
      Width           =   1455
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Currency Code"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   8
      Left            =   390
      TabIndex        =   22
      Top             =   3240
      Width           =   1320
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Vendor No"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   7
      Left            =   765
      TabIndex        =   21
      Top             =   2835
      Width           =   945
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Customer No"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   6
      Left            =   600
      TabIndex        =   20
      Top             =   2400
      Width           =   1110
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Purchase Order Type"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0080FFFF&
      Height          =   255
      Index           =   5
      Left            =   2835
      TabIndex        =   19
      Top             =   1560
      Width           =   1845
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Purchase Order Date"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   4
      Left            =   3750
      TabIndex        =   18
      Top             =   1965
      Width           =   1845
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Purchase Order No"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   255
      Index           =   3
      Left            =   90
      TabIndex        =   17
      Top             =   1980
      Width           =   1620
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "PUR800"
      BeginProperty Font 
         Name            =   "VNI-Present"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   465
      Index           =   0
      Left            =   75
      TabIndex        =   1
      Top             =   90
      Width           =   1785
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Close Purchase Order"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   16.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   465
      Index           =   1
      Left            =   3405
      TabIndex        =   0
      Top             =   435
      Width           =   4530
   End
End
Attribute VB_Name = "frmPUR800"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdClose_Click()
ClosePO
End Sub
Sub ClosePO()
Dim recPOL As Recordset, Line, Item, Wgt, Unt
Set recPOL = DBconn.Execute("Select * from where OLPON='" & txtPON & "' Where OLSTT<>'6'")
With recPOL
Do While .EOF
    Line = !OLPOL
    Item = !OLITN
    Wgt = !OLRCW - !OLODW
    Unt = !OLRCQ - !OLODQ
    DBconn.Execute ("Update POL OLODW=OLODW+" & Wgt & ", OLODQ=OLODQ+" & Unt & _
    " WHERE OLPON='" & txtPON & "' AND OLPOL='" & Line & "'")
    DBconn.Execute ("Update IIM set IMOOW=IMOOW+" & Wgt & ",IMOOU=IMOOU+" & Unt & _
    " WHERE IMITN='" & Item & "'")
    .MoveNext
Loop
.Close
End With
End Sub

Private Sub cmdExit_Click()
Unload frmPUR800
End Sub

Private Sub Form_Load()

End Sub

Private Sub txtOHPON_Change()

End Sub

Private Sub txtPON_Change()

End Sub
